﻿using System;
using Core.Framework.Model.Common;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace Core.DataAccess.Model.Project.Information
{
    public partial class ProjectInformationContext : DbContext
    {
        public ProjectInformationContext()
        {
        }

        public ProjectInformationContext(DbContextOptions<ProjectInformationContext> options)
            : base(options)
        {
        }

        public virtual DbSet<InformationAttribute> InformationAttribute { get; set; }
        public virtual DbSet<InformationHistory> InformationHistory { get; set; }
        public virtual DbSet<InformationList> InformationList { get; set; }
        public virtual DbSet<InformationType> InformationType { get; set; }
        public virtual DbSet<InformationTypeAttribute> InformationTypeAttribute { get; set; }


        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                optionsBuilder.UseSqlServer(CoreStartupHelper.GetConnectionValue("Information_SqlServerConnection"));
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        { }
    }
}
